import { createApp } from 'vue'
// import './style.css'
import './assets/less/index.less'
import App from './App.vue'

// 引入icon图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// 引入路由
import router from './router/index.js'
// 引入仓库
 import { createPinia} from 'pinia'
 import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

// 引入mock
import './api/mock.js'

import api from './api/api.js'

 const pinia=createPinia()
 pinia.use(piniaPluginPersistedstate)
const app=createApp(App)
// 引入icon图标注册为组件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }

app.config.globalProperties.$api=api

// app.use(ElementPlus)
app.use(pinia)
app.use(router)
app.mount('#app')
